package com.github.rabbithome.processor;

import us.codecraft.webmagic.Page;
import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.processor.PageProcessor;
import us.codecraft.webmagic.selector.Selectable;

import java.util.List;

/**
 * Created by tomalloc on 17-1-6.
 */
public class FangPageProcessor implements PageProcessor {
    private Site site;



    public FangPageProcessor(Site site) {
        this.site = site;
    }

    @Override
    public void process(Page page) {
        if(page.getResultItems().isSkip()){
            return;
        }
        System.out.println(page.getStatusCode());
        System.out.println(page.getHtml());
//        page.addTargetRequest(href);
    }

    @Override
    public Site getSite() {
        return site;
    }

}
